package day8;

public class SavingAccount extends Account {
    // 利率属性
    private final double interestRate;

    // 带有两个参数的构造器
    public SavingAccount(double balance, double interest_rate) {
        super(balance);
        this.interestRate = interest_rate;
    }

    // 获取利率方法
    public double getInterestRate() {
        return interestRate;
    }
}